<template>
	<view class="my_btn">
		<input type="text" v-model.trim="inputVal" placeholder="请输入关键字" class="input" @confirm="golist" />
	</view>
</template>

<script>
	export default {
		name: "mybtn",
		data() {
			return {
				inputVal: ''
			};
		},
		methods: {
			golist() {
				uni.navigateTo({
					url: `/pages/goods_list/goods_list?inputVal=${this.inputVal}`
				})
				this.inputVal = ''
			}
		}
	}
</script>

<style lang="less">
	.my_btn {
		background-color: red;
		padding: 15rpx;

		.input {
			border-radius: 15rpx;
			font-size: 30rpx;
			height: 70rpx;
			line-height: 70rpx;
			background-color: #fff;
			text-align: center;
		}
	}
</style>
